package com.example.app.components.MyChip

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.shape.CornerSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Chip
import androidx.compose.material.ChipColors
import androidx.compose.material.ChipDefaults
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Shape
import com.example.app.ui.theme.shapeMedium

@OptIn(ExperimentalMaterialApi::class)
@Composable
fun MyChip(
        onClick: () -> Unit,
        modifier: Modifier = Modifier,
        enabled: Boolean = true,
        interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
    //shape: Shape = MaterialTheme.shapes.small.copy(CornerSize(percent = 50)),
        shape: Shape = RoundedCornerShape(shapeMedium),
        border: BorderStroke? = null,
        colors: ChipColors = ChipDefaults.chipColors(
            backgroundColor = MaterialTheme.colors.surface
        ),
        leadingIcon: @Composable (() -> Unit)? = null,
        content: @Composable RowScope.() -> Unit
) {
    Chip(
        onClick,
        modifier,
        enabled,
        interactionSource,
        shape,
        border,
        colors,
        leadingIcon,
        content,
    )
}